<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var obj1 = {
            name:'andy',
            age:19,
            sayHi:function(){
                console.log('say hi');
            }
        }
        var obj2 = {
            name : 'jack',
            age:18,
            sayHi:function(){
                console.log('say hi');
                
            }
        }
        function creatdemo (name,age) {
            var obj = {};
            obj.name = name;
            obj.age = age;
            return obj;
        
        }
        var obj3 = creatdemo('zs',20);
        var obj4 = creatdemo('ls',28);
        var obj5 = creatdemo('ww',25);
        console.log(obj3,obj4);
        
    </script>
</body>
</html>